package com.zhuss.controller.core;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zhuss.bean.bo.core.config.DetailConfigBo;
import com.zhuss.bean.bo.core.config.SearchConfigBo;
import com.zhuss.common.BaseController;
import com.zhuss.common.ReadService;
import com.zhuss.core.config.ConfigReadServiceExt;
import com.zhuss.exception.AabException;


/**
 * 配置查询 controller
 * @Author zhushanshuo
   @Date 2020-02-20 11:58
 *
 */
  
 
@RestController
@RequestMapping("/config")
public class ConfigReadController extends BaseController {
	
	@Autowired
	@Qualifier("configReadService")
	private ReadService<Object, Object> configReadService;
	
	@Autowired
	@Qualifier("configReadServiceExt")
	private ConfigReadServiceExt configReadServiceExt;
	
	/**
	 * 详情
	 * @param bo
	 * @return
	 * @throws AabException
	 */
	@ResponseBody
	@RequestMapping("/detail")
    public Object detail(@RequestBody DetailConfigBo bo) throws AabException {
		
		Object result = configReadService.detail(bo);
		return result;
    }
	
	/**
	 * 列表
	 * @param bo
	 * @return
	 * @throws AabException
	 */
	@ResponseBody
    @RequestMapping("/list")
    public Object list(@RequestBody SearchConfigBo bo) throws AabException {
		
		Object result = configReadService.list(bo);
		return result;
    }
	
}
